<?php
namespace Api\Controller;
use Think\Controller;
class TrainController extends Controller {
    
    public function gettrainlist(){
        $train=M('train');  
        $t=$train->select();    
        echo json_encode($t);  
    }

    public function gettrainById(){
        $club=M('club');
        $clubid=$_GET['clubid'];   
        $c=$club->where("clubid='$clubid'")->find();    
        echo json_encode($c);   
    }
}
?>